﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WpfSnqkGasAnalysis.IData;
using WpfSnqkGasAnalysis.Model;

namespace WpfSnqkGasAnalysis.IData_impl
{
    /// <summary>
    /// 特殊报告。审核历史。数据接口实现。
    /// </summary>
    /// 创建时间：2022-12-22 15:32:39。作者：王浩力
    public class Teshu_gas_check_historyDAL_impl : BaseDAL, ITeshu_gas_check_historyDAL
    {
        public List<Teshu_gas_check_history> GetList(long teshuKEY)
        {
            string sql = " select  *  from  Teshu_gas_check_history  where teshu_gas_key= " + teshuKEY;
            return ExecSqlCmd(sql, null, c =>
             {
                 List<Teshu_gas_check_history> list = new List<Teshu_gas_check_history>();
                 var reader = c.ExecuteReader();
                 while (reader.Read())
                 {
                     Teshu_gas_check_history teshu_Gas_Check_History = new Teshu_gas_check_history();
                     teshu_Gas_Check_History.Id =(long) reader["id"].ToMyInt64();
                     teshu_Gas_Check_History.Check_user_name = reader["Check_user_name"].ToString();
                     teshu_Gas_Check_History.Check_user_id = (long)reader["Check_user_id"].ToMyInt64();
                     teshu_Gas_Check_History.Check_time = reader["Check_time"].ToString();
                     teshu_Gas_Check_History.Check_stat = (byte)reader["Check_stat"].ToMyInt64();
                     teshu_Gas_Check_History.Reject_reason = reader["Reject_reason"].ToString();
                     teshu_Gas_Check_History.Teshu_gas_key = (long)reader["Teshu_gas_key"].ToMyInt64();
                     list.Add(teshu_Gas_Check_History);
                 }
                 return list;
             });

        }
    }
}
